home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / rfc / rfc1352 < prev    next >
Text File  |  1992-07-08  |  96KB  |  2,300 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         J. Galvin
  8. Request for Comments: 1352            Trusted Information Systems, Inc.
  9.                                                           K. McCloghrie
  10.                                                Hughes LAN Systems, Inc.
  11.                                                                J. Davin
  12.                                     MIT Laboratory for Computer Science
  13.                                                               July 1992
  14.  
  15.  
  16.                         SNMP Security Protocols
  17.  
  18. Status of this Memo
  19.  
  20.    This document specifies an IAB standards track protocol for the
  21.    Internet community, and requests discussion and suggestions for
  22.    improvements. Please refer to the current edition of the "IAB
  23.    Official Protocol Standards" for the standardization state and status
  24.    of this protocol. Distribution of this memo is unlimited.
  25.  
  26. Table of Contents
  27.  
  28.    1.    Abstract . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  29.    2.    Introduction . . . . . . . . . . . . . . . . . . . . . . . .   2
  30.    2.1   Threats  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  31.    2.2   Goals and Constraints  . . . . . . . . . . . . . . . . . . .   5
  32.    2.3   Security Services  . . . . . . . . . . . . . . . . . . . . .   6
  33.    2.4   Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . .   6
  34.    2.4.1   Message Digest Algorithm . . . . . . . . . . . . . . . . .   7
  35.    2.4.2   Symmetric Encryption Algorithm . . . . . . . . . . . . . .   8
  36.    3.    SNMP Party   . . . . . . . . . . . . . . . . . . . . . . . .   9
  37.    4.    Digest Authentication Protocol . . . . . . . . . . . . . . .  11
  38.    4.1   Generating a Message   . . . . . . . . . . . . . . . . . . .  14
  39.    4.2   Receiving a Message  . . . . . . . . . . . . . . . . . . . .  15
  40.    5.    Symmetric Privacy Protocol . . . . . . . . . . . . . . . . .  16
  41.    5.1   Generating a Message   . . . . . . . . . . . . . . . . . . .  17
  42.    5.2   Receiving a Message  . . . . . . . . . . . . . . . . . . . .  18
  43.    6.    Clock and Secret Distribution  . . . . . . . . . . . . . . .  19
  44.    6.1   Initial Configuration    . . . . . . . . . . . . . . . . . .  20
  45.    6.2   Clock Distribution   . . . . . . . . . . . . . . . . . . . .  22
  46.    6.3   Clock Synchronization  . . . . . . . . . . . . . . . . . . .  24
  47.    6.4   Secret Distribution  . . . . . . . . . . . . . . . . . . . .  26
  48.    6.5   Crash Recovery   . . . . . . . . . . . . . . . . . . . . . .  28
  49.    7.    Security Considerations  . . . . . . . . . . . . . . . . . .  30
  50.    7.1   Recommended Practices  . . . . . . . . . . . . . . . . . . .  30
  51.    7.2   Conformance    . . . . . . . . . . . . . . . . . . . . . . .  33
  52.    7.3   Protocol Correctness . . . . . . . . . . . . . . . . . . . .  34
  53.    7.3.1   Clock Monotonicity Mechanism . . . . . . . . . . . . . . .  35
  54.    7.3.2   Data Integrity Mechanism . . . . . . . . . . . . . . . . .  36
  55.  
  56.  
  57.  
  58. Galvin, McCloghrie, & Davin                                     [Page 1]
  59.  
  60. RFC 1352                SNMP Security Protocols                July 1992
  61.  
  62.  
  63.    7.3.3   Data Origin Authentication Mechanism . . . . . . . . . . .  36
  64.    7.3.4   Restricted Administration Mechanism  . . . . . . . . . . .  36
  65.    7.3.5   Ordered Delivery Mechanism   . . . . . . . . . . . . . . .  37
  66.    7.3.6   Message Timeliness Mechanism . . . . . . . . . . . . . . .  38
  67.    7.3.7   Selective Clock Acceleration Mechanism . . . . . . . . . .  38
  68.    7.3.8   Confidentiality Mechanism  . . . . . . . . . . . . . . . .  39
  69.    8.    Acknowledgements . . . . . . . . . . . . . . . . . . . . . .  39
  70.    9.    References . . . . . . . . . . . . . . . . . . . . . . . . .  40
  71.    10.   Authors' Addresses . . . . . . . . . . . . . . . . . . . . .  41
  72.  
  73. 1.  Abstract
  74.  
  75.    The Simple Network Management Protocol (SNMP) specification [1]
  76.    allows for the protection of network management operations by a
  77.    variety of security protocols.  The SNMP administrative model
  78.    described in [2] provides a framework for securing SNMP network
  79.    management. In the context of that framework, this memo defines
  80.    protocols to support the following three security services:
  81.  
  82.      o data integrity,
  83.  
  84.      o data origin authentication, and
  85.  
  86.      o data confidentiality.
  87.  
  88.    Please send comments to the SNMP Security Developers mailing list
  89.    (snmp-sec-dev@tis.com).
  90.  
  91. 2.  Introduction
  92.  
  93.    In the model described in [2], each SNMP party is, by definition,
  94.    associated with a single authentication protocol.  The authentication
  95.    protocol provides a mechanism by which SNMP management communications
  96.    transmitted by the party may be reliably identified as having
  97.    originated from that party. The authentication protocol defined in
  98.    this memo also reliably determines that the message received is the
  99.    message that was sent.
  100.  
  101.    Similarly, each SNMP party is, by definition, associated with a
  102.    single privacy protocol. The privacy protocol provides a mechanism by
  103.    which SNMP management communications transmitted to said party are
  104.    protected from disclosure. The privacy protocol in this memo
  105.    specifies that only authenticated messages may be protected from
  106.    disclosure.
  107.  
  108.    These protocols are secure alternatives to the so-called "trivial"
  109.    protocol defined in [1].
  110.  
  111.  
  112.  
  113.  
  114. Galvin, McCloghrie, & Davin                                     [Page 2]
  115.  
  116. RFC 1352                SNMP Security Protocols                July 1992
  117.  
  118.  
  119.       USE OF THE TRIVIAL PROTOCOL ALONE DOES NOT CONSTITUTE SECURE
  120.       NETWORK MANAGEMENT. THEREFORE, A NETWORK MANAGEMENT SYSTEM THAT
  121.       IMPLEMENTS ONLY THE TRIVIAL PROTOCOL IS NOT CONFORMANT TO THIS
  122.       SPECIFICATION.
  123.  
  124.    The Digest Authentication Protocol is described in Section 4.  It
  125.    provides a data integrity service by transmitting a message digest --
  126.    computed by the originator and verified by the recipient -- with each
  127.    SNMP message. The data origin authentication service is provided by
  128.    prefixing the message with a secret value known only to the
  129.    originator and recipient, prior to computing the digest. Thus, data
  130.    integrity is supported explicitly while data origin authentication is
  131.    supported implicitly in the verification of the digest.
  132.  
  133.    The Symmetric Privacy Protocol is described in Section 5. It protects
  134.    messages from disclosure by encrypting their contents according to a
  135.    secret cryptographic key known only to the originator and recipient.
  136.    The additional functionality afforded by this protocol is assumed to
  137.    justify its additional computational cost.
  138.  
  139.    The Digest Authentication Protocol depends on the existence of
  140.    loosely synchronized clocks between the originator and recipient of a
  141.    message. The protocol specification makes no assumptions about the
  142.    strategy by which such clocks are synchronized. Section 6.3 presents
  143.    one strategy that is particularly suited to the demands of SNMP
  144.    network management.
  145.  
  146.    Both protocols described here require the sharing of secret
  147.    information between the originator of a message and its recipient.
  148.    The protocol specifications assume the existence of the necessary
  149.    secrets. The selection of such secrets and their secure distribution
  150.    to appropriate parties may be accomplished by a variety of
  151.    strategies. Section 6.4 presents one such strategy that is
  152.    particularly suited to the demands of SNMP network management.
  153.  
  154. 2.1   Threats
  155.  
  156.    Several of the classical threats to network protocols are applicable
  157.    to the network management problem and therefore would be applicable
  158.    to any SNMP security protocol. Other threats are not applicable to
  159.    the network management problem. This section discusses principal
  160.    threats, secondary threats, and threats which are of lesser
  161.    importance.
  162.  
  163.    The principal threats against which any SNMP security protocol should
  164.    provide protection are:
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Galvin, McCloghrie, & Davin                                     [Page 3]
  171.  
  172. RFC 1352                SNMP Security Protocols                July 1992
  173.  
  174.  
  175.    Modification of Information.
  176.       The SNMP protocol provides the means for management stations to
  177.       interrogate and to manipulate the value of objects in a managed
  178.       agent.  The modification threat is the danger that some party may
  179.       alter in-transit messages generated by an authorized party in such
  180.       a way as to effect unauthorized management operations, including
  181.       falsifying the value of an object.
  182.  
  183.    Masquerade.
  184.       The SNMP administrative model includes an access control model.
  185.       Access control necessarily depends on knowledge of the origin of a
  186.       message.  The masquerade threat is the danger that management
  187.       operations not authorized for some party may be attempted by that
  188.       party by assuming the identity of another party that has the
  189.       appropriate authorizations.
  190.  
  191.    Two secondary threats are also identified. The security protocols
  192.    defined in this memo do provide protection against:
  193.  
  194.    Message Stream Modification.
  195.       The SNMP protocol is based upon connectionless transport services.
  196.       The message stream modification threat is the danger that messages
  197.       may be arbitrarily re-ordered, delayed or replayed to effect
  198.       unauthorized management operations.  This threat may arise either
  199.       by the work of a malicious attacker or by the natural operation of
  200.       a subnetwork service.
  201.  
  202.    Disclosure.
  203.       The disclosure threat is the danger of eavesdropping on the
  204.       exchanges between managed agents and a management station.
  205.       Protecting against this threat is mandatory when the SNMP is used
  206.       to administer private parameters on which its security is based.
  207.       Protecting against the disclosure threat may also be required as a
  208.       matter of local policy.
  209.  
  210.    There are at least two threats that a SNMP security protocol need not
  211.    protect against. The security protocols defined in this memo do not
  212.    provide protection against:
  213.  
  214.    Denial of Service.
  215.       A SNMP security protocol need not attempt to address the broad
  216.       range of attacks by which service to authorized parties is denied.
  217.       Indeed, such denial-of-service attacks are in many cases
  218.       indistinguishable from the type of network failures with which any
  219.       viable network management protocol must cope as a matter of
  220.       course.
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Galvin, McCloghrie, & Davin                                     [Page 4]
  227.  
  228. RFC 1352                SNMP Security Protocols                July 1992
  229.  
  230.  
  231.    Traffic Analysis.
  232.       In addition, a SNMP security protocol need not attempt to address
  233.       traffic analysis attacks.  Indeed, many traffic patterns are
  234.       predictable -- agents may be managed on a regular basis by a
  235.       relatively small number of management stations -- and therefore
  236.       there is no significant advantage afforded by protecting against
  237.       traffic analysis.
  238.  
  239. 2.2   Goals and Constraints
  240.  
  241.    Based on the foregoing account of threats in the SNMP network
  242.    management environment, the goals of a SNMP security protocol are
  243.    enumerated below.
  244.  
  245.     1. The protocol should provide for verification that each
  246.        received SNMP message has not been modified during
  247.        its transmission through the network in such a way that
  248.        an unauthorized management operation might result.
  249.  
  250.     2. The protocol should provide for verification of the
  251.        identity of the originator of each received SNMP
  252.        message.
  253.  
  254.     3. The protocol should provide that the apparent time of
  255.        generation for each received SNMP message is recent.
  256.  
  257.     4. The protocol should provide that the apparent time of
  258.        generation for each received SNMP message is
  259.        subsequent to that for all previously delivered messages
  260.        of similar origin.
  261.  
  262.     5. The protocol should provide, when necessary, that the
  263.        contents of each received SNMP message are protected
  264.        from disclosure.
  265.  
  266.    In addition to the principal goal of supporting secure network
  267.    management, the design of any SNMP security protocol is also
  268.    influenced by the following constraints:
  269.  
  270.     1. When the requirements of effective management in times
  271.        of network stress are inconsistent with those of security,
  272.        the former are preferred.
  273.  
  274.     2. Neither the security protocol nor its underlying security
  275.        mechanisms should depend upon the ready availability
  276.        of other network services (e.g., Network Time Protocol
  277.        (NTP) or secret/key management protocols).
  278.  
  279.  
  280.  
  281.  
  282. Galvin, McCloghrie, & Davin                                     [Page 5]
  283.  
  284. RFC 1352                SNMP Security Protocols                July 1992
  285.  
  286.  
  287.     3. A security mechanism should entail no changes to the
  288.        basic SNMP network management philosophy.
  289.  
  290. 2.3   Security Services
  291.  
  292.    The security services necessary to support the goals of a SNMP
  293.    security protocol are as follows.
  294.  
  295.    Data Integrity   is the provision of the property that data
  296.        and data sequences have not been altered or destroyed
  297.        in an unauthorized manner.
  298.  
  299.    Data Origin Authentication    is the provision of the
  300.        property that the claimed origin of received data is
  301.        corroborated.
  302.  
  303.    Data Confidentiality   is the provision of the property that
  304.        information is not made available or disclosed to
  305.        unauthorized individuals, entities, or processes.
  306.  
  307.       The protocols specified in this memo require both data
  308.       integrity and data origin authentication to be used at all
  309.       times. For these protocols, it is not possible to realize data
  310.       integrity without data origin authentication, nor is it possible
  311.       to realize data origin authentication without data integrity.
  312.  
  313.       Further, there is no provision for data confidentiality without
  314.       both data integrity and data origin authentication.
  315.  
  316. 2.4   Mechanisms
  317.  
  318.       The security protocols defined in this memo employ several
  319.       types of mechanisms in order to realize the goals and security
  320.       services described above:
  321.  
  322.      o In support of data integrity, a message digest algorithm
  323.        is required. A digest is calculated over an appropriate
  324.        portion of a SNMP message and included as part of the
  325.        message sent to the recipient.
  326.  
  327.      o In support of data origin authentication and data
  328.        integrity, the portion of a SNMP message that is
  329.        digested is first prefixed with a secret value shared by
  330.        the originator of that message and its intended recipient.
  331.  
  332.      o To protect against the threat of message reordering, a
  333.        timestamp value is included in each message generated.
  334.        A recipient evaluates the timestamp to determine if the
  335.  
  336.  
  337.  
  338. Galvin, McCloghrie, & Davin                                     [Page 6]
  339.  
  340. RFC 1352                SNMP Security Protocols                July 1992
  341.  
  342.  
  343.        message is recent and it uses the timestamp to determine
  344.        if the message is ordered relative to other messages it
  345.        has received. In conjunction with other readily available
  346.        information (e.g., the request-id), the timestamp also
  347.        indicates whether or not the message is a replay of a
  348.        previous message. This protection against the threat of
  349.        message reordering implies no protection against
  350.        unauthorized deletion or suppression of messages.
  351.  
  352.      o In support of data confidentiality, a symmetric
  353.        encryption algorithm is required. An appropriate
  354.        portion of the message is encrypted prior to being
  355.        transmitted to its recipient.
  356.  
  357.    The security protocols in this memo are defined independently of the
  358.    particular choice of a message digest and encryption algorithm --
  359.    owing principally to the lack of a suitable metric by which to
  360.    evaluate the security of particular algorithm choices. However, in
  361.    the interests of completeness and in order to guarantee
  362.    interoperability, Sections 2.4.1 and 2.4.2 specify particular
  363.    choices, which are considered acceptably secure as of this writing.
  364.    In the future, this memo may be updated by the publication of a memo
  365.    specifying substitute or alternate choices of algorithms, i.e., a
  366.    replacement for or addition to the sections below.
  367.  
  368. 2.4.1   Message Digest Algorithm
  369.  
  370.    In support of data integrity, the use of the MD5 [3] message digest
  371.    algorithm is chosen. A 128-bit digest is calculated over the
  372.    designated portion of a SNMP message and included as part of the
  373.    message sent to the recipient.
  374.  
  375.    An appendix of [3] contains a C Programming Language implementation
  376.    of the algorithm. This code was written with portability being the
  377.    principal objective. Implementors may wish to optimize the
  378.    implementation with respect to the characteristics of their hardware
  379.    and software platforms.
  380.  
  381.    The use of this algorithm in conjunction with the Digest
  382.    Authentication Protocol (see Section 4) is identified by the ASN.1
  383.    object identifier value md5AuthProtocol, defined in [4].
  384.  
  385.    For any SNMP party for which the authentication protocol is
  386.    md5AuthProtocol, the size of its private authentication key is 16
  387.    octets.
  388.  
  389.    Within an authenticated management communication generated by such a
  390.    party, the size of the authDigest component of that communication
  391.  
  392.  
  393.  
  394. Galvin, McCloghrie, & Davin                                     [Page 7]
  395.  
  396. RFC 1352                SNMP Security Protocols                July 1992
  397.  
  398.  
  399.    (see Section 4) is 16 octets.
  400.  
  401. 2.4.2   Symmetric Encryption Algorithm
  402.  
  403.    In support of data confidentiality, the use of the Data Encryption
  404.    Standard (DES) in the Cipher Block Chaining mode of operation is
  405.    chosen. The designated portion of a SNMP message is encrypted and
  406.    included as part of the message sent to the recipient.
  407.  
  408.    Two organizations have published specifications defining the DES: the
  409.    National Institute of Standards and Technology (NIST) [5] and the
  410.    American National Standards Institute [6].  There is a companion
  411.    Modes of Operation specification for each definition (see [7] and
  412.    [8], respectively).
  413.  
  414.    The NIST has published three additional documents that implementors
  415.    may find useful.
  416.  
  417.      o There is a document with guidelines for implementing
  418.        and using the DES, including functional specifications
  419.        for the DES and its modes of operation [9].
  420.  
  421.      o There is a specification of a validation test suite for the
  422.        DES [10]. The suite is designed to test all aspects of the
  423.        DES and is useful for pinpointing specific problems.
  424.  
  425.      o There is a specification of a maintenance test for the
  426.        DES [11]. The test utilizes a minimal amount of data
  427.        and processing to test all components of the DES. It
  428.        provides a simple yes-or-no indication of correct
  429.        operation and is useful to run as part of an initialization
  430.        step, e.g., when a computer reboots.
  431.  
  432.  
  433.    The use of this algorithm in conjunction with the Symmetric Privacy
  434.    Protocol (see Section 5) is identified by the ASN.1 object identifier
  435.    value desPrivProtocol, defined in [4].
  436.  
  437.    For any SNMP party for which the privacy protocol is desPrivProtocol,
  438.    the size of the private privacy key is 16 octets, of which the first
  439.    8 octets are a DES key and the second 8 octets are a DES
  440.    Initialization Vector. The 64-bit DES key in the first 8 octets of
  441.    the private key is a 56 bit quantity used directly by the algorithm
  442.    plus 8 parity bits -- arranged so that one parity bit is the least
  443.    significant bit of each octet. The setting of the parity bits is
  444.    ignored.
  445.  
  446.    The length of the octet sequence to be encrypted by the DES must be
  447.  
  448.  
  449.  
  450. Galvin, McCloghrie, & Davin                                     [Page 8]
  451.  
  452. RFC 1352                SNMP Security Protocols                July 1992
  453.  
  454.  
  455.    an integral multiple of 8. When encrypting, the data should be padded
  456.    at the end as necessary; the actual pad value is insignificant.
  457.  
  458.    If the length of the octet sequence to be decrypted is not an
  459.    integral multiple of 8 octets, the processing of the octet sequence
  460.    should be halted and an appropriate exception noted. Upon decrypting,
  461.    the padding should be ignored.
  462.  
  463. 3.  SNMP Party
  464.  
  465.    Recall from [2] that a SNMP party is a conceptual, virtual execution
  466.    context whose operation is restricted (for security or other
  467.    purposes) to an administratively defined subset of all possible
  468.    operations of a particular SNMP protocol entity. A SNMP protocol
  469.    entity is an actual process which performs network management
  470.    operations by generating and/or responding to SNMP protocol messages
  471.    in the manner specified in [1]. Architecturally, every SNMP protocol
  472.    entity maintains a local database that represents all SNMP parties
  473.    known to it.
  474.  
  475.    A SNMP party may be represented by an ASN.1 value with the following
  476.    syntax.
  477.  
  478.  
  479.       SnmpParty ::= SEQUENCE {
  480.         partyIdentity
  481.            OBJECT IDENTIFIER,
  482.         partyTDomain
  483.            OBJECT IDENTIFIER,
  484.         partyTAddr
  485.            OCTET STRING,
  486.         partyProxyFor
  487.            OBJECT IDENTIFIER,
  488.         partyMaxMessageSize
  489.            INTEGER,
  490.         partyAuthProtocol
  491.            OBJECT IDENTIFIER,
  492.         partyAuthClock
  493.            INTEGER,
  494.         partyAuthLastMsg
  495.            INTEGER,
  496.         partyAuthNonce
  497.            INTEGER,
  498.         partyAuthPrivate
  499.            OCTET STRING,
  500.         partyAuthPublic
  501.            OCTET STRING,
  502.         partyAuthLifetime
  503.  
  504.  
  505.  
  506. Galvin, McCloghrie, & Davin                                     [Page 9]
  507.  
  508. RFC 1352                SNMP Security Protocols                July 1992
  509.  
  510.  
  511.            INTEGER,
  512.         partyPrivProtocol
  513.            OBJECT IDENTIFIER,
  514.         partyPrivPrivate
  515.            OCTET STRING,
  516.         partyPrivPublic
  517.            OCTET STRING
  518.       }
  519.  
  520.  
  521.    For each SnmpParty value that represents a SNMP party, the generic
  522.    significance of each of its components is defined in [2]. For each
  523.    SNMP party that supports the generation of messages using the Digest
  524.    Authentication Protocol, additional, special significance is
  525.    attributed to certain components of that party's representation:
  526.  
  527.      o Its partyAuthProtocol component is called the
  528.        authentication protocol and identifies a combination of
  529.        the Digest Authentication Protocol with a particular
  530.        digest algorithm (such as that defined in Section 2.4.1).
  531.        This combined mechanism is used to authenticate the
  532.        origin and integrity of all messages generated by the
  533.        party.
  534.  
  535.      o Its partyAuthClock component is called the
  536.        authentication clock and represents a notion of the
  537.        current time that is specific to the party.
  538.  
  539.      o Its partyAuthLastMsg component is called the
  540.        last-timestamp and represents a notion of time
  541.        associated with the most recent, authentic protocol
  542.        message generated by the party.
  543.  
  544.      o Its partyAuthNonce component is called the nonce
  545.        and represents a monotonically increasing integer
  546.        associated with the most recent, authentic protocol
  547.        message generated by the party. The nonce associated
  548.        with a particular message distinguishes it among all
  549.        others transmitted in the same unit time interval.
  550.  
  551.      o Its partyAuthPrivate component is called the private
  552.        authentication key and represents any secret value
  553.        needed to support the Digest Authentication Protocol
  554.        and associated digest algorithm.
  555.  
  556.      o Its partyAuthPublic component is called the public
  557.        authentication key and represents any public value that
  558.        may be needed to support the authentication protocol.
  559.  
  560.  
  561.  
  562. Galvin, McCloghrie, & Davin                                    [Page 10]
  563.  
  564. RFC 1352                SNMP Security Protocols                July 1992
  565.  
  566.  
  567.        This component is not significant except as suggested in
  568.        Section 6.4.
  569.  
  570.      o Its partyAuthLifetime component is called the
  571.        lifetime and represents an administrative upper bound
  572.        on acceptable delivery delay for protocol messages
  573.        generated by the party.
  574.  
  575.    For each SNMP party that supports the receipt of messages via the
  576.    Symmetric Privacy Protocol, additional, special significance is
  577.    attributed to certain components of that party's representation:
  578.  
  579.      o Its partyPrivProtocol component is called the privacy
  580.        protocol and identifies a combination of the Symmetric
  581.        Privacy Protocol with a particular encryption algorithm
  582.        (such as that defined in Section 2.4.2). This combined
  583.        mechanism is used to protect from disclosure all protocol
  584.        messages received by the party.
  585.  
  586.      o Its partyPrivPrivate component is called the private
  587.        privacy key and represents any secret value needed to
  588.        support the Symmetric Privacy Protocol and associated
  589.        encryption algorithm.
  590.  
  591.      o Its partyPrivPublic component is called the public
  592.        privacy key and represents any public value that may be
  593.        needed to support the privacy protocol. This component
  594.        is not significant except as suggested in Section 6.4.
  595.  
  596. 4.  Digest Authentication Protocol
  597.  
  598.    This section describes the Digest Authentication Protocol. It
  599.    provides both for verifying the integrity of a received message
  600.    (i.e., the message received is the message sent) and for verifying
  601.    the origin of a message (i.e., the reliable identification of the
  602.    originator). The integrity of the message is protected by computing a
  603.    digest over an appropriate portion of a message. The digest is
  604.    computed by the originator of the message, transmitted with the
  605.    message, and verified by the recipient of the message.
  606.  
  607.    A secret value known only to the originator and recipient of the
  608.    message is prefixed to the message prior to the digest computation.
  609.    Thus, the origin of the message is known implicitly with the
  610.    verification of the digest.
  611.  
  612.    Recall from [2] that a SNMP management communication is represented
  613.    by an ASN.1 value with the following syntax.
  614.  
  615.  
  616.  
  617.  
  618. Galvin, McCloghrie, & Davin                                    [Page 11]
  619.  
  620. RFC 1352                SNMP Security Protocols                July 1992
  621.  
  622.  
  623.       SnmpMgmtCom ::= [1] IMPLICIT SEQUENCE {
  624.         dstParty
  625.            OBJECT IDENTIFIER,
  626.         srcParty
  627.            OBJECT IDENTIFIER,
  628.         pdu   PDUs
  629.       }
  630.  
  631.  
  632.    For each SnmpMgmtCom value that represents a SNMP management
  633.    communication, the following statements are true:
  634.  
  635.      o Its dstParty component is called the destination and
  636.        identifies the SNMP party to which the communication
  637.        is directed.
  638.  
  639.      o Its srcParty component is called the source and
  640.        identifies the SNMP party from which the
  641.        communication is originated.
  642.  
  643.      o Its pdu component has the form and significance
  644.        attributed to it in [1].
  645.  
  646.    Recall from [2] that a SNMP authenticated management communication is
  647.    represented by an ASN.1 value with the following syntax.
  648.  
  649.       SnmpAuthMsg ::= [1] IMPLICIT SEQUENCE {
  650.         authInfo
  651.            ANY, - defined by authentication protocol
  652.         authData
  653.            SnmpMgmtCom
  654.       }
  655.  
  656.  
  657.    For each SnmpAuthMsg value that represents a SNMP authenticated
  658.    management communication, the following statements are true:
  659.  
  660.      o Its authInfo component is called the authentication
  661.        information and represents information required in
  662.        support of the authentication protocol used by the
  663.        SNMP party originating the message. The detailed
  664.        significance of the authentication information is specific
  665.        to the authentication protocol in use; it has no effect on
  666.        the application semantics of the communication other
  667.        than its use by the authentication protocol in
  668.        determining whether the communication is authentic or
  669.        not.
  670.  
  671.  
  672.  
  673.  
  674. Galvin, McCloghrie, & Davin                                    [Page 12]
  675.  
  676. RFC 1352                SNMP Security Protocols                July 1992
  677.  
  678.  
  679.      o Its authData component is called the authentication
  680.        data and represents a SNMP management
  681.        communication.
  682.  
  683.    In support of the Digest Authentication Protocol, an authInfo
  684.    component is of type AuthInformation:
  685.  
  686.       AuthInformation ::= [1] IMPLICIT SEQUENCE {
  687.         authTimestamp
  688.            INTEGER (0..2147483647),
  689.         authNonce
  690.            INTEGER (0..2147483647),
  691.         authDigest
  692.            OCTET STRING
  693.       }
  694.  
  695.  
  696.    For each AuthInformation value that represents authentication
  697.    information, the following statements are true:
  698.  
  699.  
  700.      o Its authTimestamp component is called the
  701.        authentication timestamp and represents the time of the
  702.        generation of the message according to the
  703.        partyAuthClock of the SNMP party that originated
  704.        it. Note that the granularity of the authentication
  705.        timestamp is 1 second.
  706.  
  707.      o Its authNonce component is called the authentication
  708.        nonce and represents a non-negative integer value
  709.        evaluated according to the authTimestamp value. In
  710.        order not to limit transmission frequency of management
  711.        communications to the granularity of the authentication
  712.        timestamp, the authentication nonce is provided to
  713.        differentiate between multiple messages sent with the
  714.        same value of authTimestamp. The authentication
  715.        nonce is a monotonically increasing sequence number,
  716.        that is reset for each new authentication timestamp
  717.        value.
  718.  
  719.      o Its authDigest component is called the authentication
  720.        digest and represents the digest computed over an
  721.        appropriate portion of the message, where the message is
  722.        temporarily prefixed with a secret value for the purposes
  723.        of computing the digest.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Galvin, McCloghrie, & Davin                                    [Page 13]
  731.  
  732. RFC 1352                SNMP Security Protocols                July 1992
  733.  
  734.  
  735. 4.1   Generating a Message
  736.  
  737.    This section describes the behavior of a SNMP protocol entity when it
  738.    acts as a SNMP party for which the authentication protocol is
  739.    administratively specified as the Digest Authentication Protocol.
  740.    Insofar as the behavior of a SNMP protocol entity when transmitting
  741.    protocol messages is defined generically in [2], only those aspects
  742.    of that behavior that are specific to the Digest Authentication
  743.    Protocol are described below. In particular, this section describes
  744.    the encapsulation of a SNMP management communication into a SNMP
  745.    authenticated management communication.
  746.  
  747.    According to [2], a SnmpAuthMsg value is constructed during Step 3 of
  748.    generic processing. In particular, it states the authInfo component
  749.    is constructed according to the authentication protocol identified
  750.    for the SNMP party originating the message. When the relevant
  751.    authentication protocol is the Digest Authentication Protocol, the
  752.    procedure performed by a SNMP protocol entity whenever a management
  753.    communication is to be transmitted by a SNMP party is as follows.
  754.  
  755.     1. The local database is consulted to determine the
  756.        authentication clock, last-timestamp, nonce, and private
  757.        authentication key (extracted, for example, according to
  758.        the conventions defined in Section 2.4.1) of the SNMP
  759.        party originating the message.
  760.  
  761.     2. The authTimestamp component is set to the retrieved
  762.        authentication clock value.
  763.  
  764.     3. If the last-timestamp is equal to the authentication
  765.        clock, the nonce is incremented. Otherwise the nonce is
  766.        set to zero. The authNonce component is set to the
  767.        nonce value. In the local database, the originating
  768.        SNMP party's nonce and last-timestamp are set to the
  769.        nonce value and the authentication clock, respectively.
  770.  
  771.     4. The authentication digest is temporarily set to the
  772.        private authentication key. The SnmpAuthMsg value
  773.        is serialized according to the conventions of [12] and [1].
  774.        A digest is computed over the octet sequence
  775.        representing that serialized value using, for example, the
  776.        algorithm specified in Section 2.4.1. The authDigest
  777.        component is set to the computed digest value.
  778.  
  779.    As set forth in [2], the SnmpAuthMsg value is then encapsulated
  780.    according to the appropriate privacy protocol into a SnmpPrivMsg
  781.    value. This latter value is then serialized and transmitted to the
  782.    receiving SNMP party.
  783.  
  784.  
  785.  
  786. Galvin, McCloghrie, & Davin                                    [Page 14]
  787.  
  788. RFC 1352                SNMP Security Protocols                July 1992
  789.  
  790.  
  791. 4.2   Receiving a Message
  792.  
  793.    This section describes the behavior of a SNMP protocol entity upon
  794.    receipt of a protocol message from a SNMP party for which the
  795.    authentication protocol is administratively specified as the Digest
  796.    Authentication Protocol. Insofar as the behavior of a SNMP protocol
  797.    entity when receiving protocol messages is defined generically in
  798.    [2], only those aspects of that behavior that are specific to the
  799.    Digest Authentication Protocol are described below.
  800.  
  801.    According to [2], a SnmpAuthMsg value is evaluated during Step 9 of
  802.    generic processing. In particular, it states the SnmpAuthMsg value is
  803.    evaluated according to the authentication protocol identified for the
  804.    SNMP party that originated the message. When the relevant
  805.    authentication protocol is the Digest Authentication Protocol, the
  806.    procedure performed by a SNMP protocol entity whenever a management
  807.    communication is received by a SNMP party is as follows.
  808.  
  809.     1. If the ASN.1 type of the authInfo component is not
  810.        AuthInformation, the message is evaluated as
  811.        unauthentic. Otherwise, the authTimestamp,
  812.        authNonce, and authDigest components are
  813.        extracted from the SnmpAuthMsg value.
  814.  
  815.     2. The local database is consulted to determine the
  816.        authentication clock, last-timestamp, nonce, private
  817.        authentication key (extracted, for example, according to
  818.        the conventions defined in Section 2.4.1), and lifetime of
  819.        the SNMP party that originated the message.
  820.  
  821.     3. If the authTimestamp component plus the lifetime is
  822.        less than the authentication clock, the message is
  823.        evaluated as unauthentic.
  824.  
  825.     4. If the authTimestamp component is less than the
  826.        last-timestamp recorded for the originating party in the
  827.        local database, the message is evaluated as unauthentic.
  828.  
  829.     5. If the authTimestamp component is equal to the
  830.        last-timestamp and if the authNonce component is less
  831.        than or equal to the nonce, the message is evaluated as
  832.        unauthentic.
  833.  
  834.     6. The authDigest component is extracted and
  835.        temporarily recorded.
  836.  
  837.     7. A new SnmpAuthMsg value is constructed such that
  838.        its authDigest component is set to the private
  839.  
  840.  
  841.  
  842. Galvin, McCloghrie, & Davin                                    [Page 15]
  843.  
  844. RFC 1352                SNMP Security Protocols                July 1992
  845.  
  846.  
  847.        authentication key and its other components are set to
  848.        the value of the corresponding components in the
  849.        received SnmpAuthMsg value. This new
  850.        SnmpAuthMsg value is serialized according to the
  851.        conventions of [12] and [1]. A digest is computed over
  852.        the octet sequence representing that serialized value
  853.        using, for example, the algorithm specified in
  854.        Section 2.4.1.
  855.  
  856.     8. If the computed digest value is not equal to the
  857.        previously recorded digest value, the message is
  858.        evaluated as unauthentic.
  859.  
  860.     9. The message is evaluated as authentic.
  861.  
  862.    10. The last-timestamp and nonce values locally recorded
  863.        for the originating SNMP party are set to the
  864.        authTimestamp value and the authNonce value,
  865.        respectively.
  866.  
  867.    11. The authentication clock value locally recorded for the
  868.        originating SNMP party is advanced to the
  869.        authTimestamp value if this latter exceeds the
  870.        recorded value.
  871.  
  872.    If the SnmpAuthMsg value is evaluated as unauthentic, an
  873.    authentication failure is noted and the received message is discarded
  874.    without further processing. Otherwise, processing of the received
  875.    message continues as specified in [2].
  876.  
  877. 5.  Symmetric Privacy Protocol
  878.  
  879.    This section describes the Symmetric Privacy Protocol. It provides
  880.    for protection from disclosure of a received message.  An appropriate
  881.    portion of the message is encrypted according to a secret key known
  882.    only to the originator and recipient of the message.
  883.  
  884.    This protocol assumes the underlying mechanism is a symmetric
  885.    encryption algorithm. In addition, the message to be encrypted must
  886.    be protected according to the conventions of the Digest
  887.    Authentication Protocol.
  888.  
  889.    Recall from [2] that a SNMP private management communication is
  890.    represented by an ASN.1 value with the following syntax.
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Galvin, McCloghrie, & Davin                                    [Page 16]
  899.  
  900. RFC 1352                SNMP Security Protocols                July 1992
  901.  
  902.  
  903.       SnmpPrivMsg ::= [1] IMPLICIT SEQUENCE {
  904.         privDst
  905.            OBJECT IDENTIFIER,
  906.         privData
  907.            [1] IMPLICIT OCTET STRING
  908.       }
  909.  
  910.  
  911.    For each SnmpPrivMsg value that represents a SNMP private management
  912.    communication, the following statements are true:
  913.  
  914.      o Its privDst component is called the privacy destination
  915.        and identifies the SNMP party to which the
  916.        communication is directed.
  917.  
  918.      o Its privData component is called the privacy data and
  919.        represents the (possibly encrypted) serialization
  920.        (according to the conventions of [12] and [1]) of a SNMP
  921.        authenticated management communication.
  922.  
  923. 5.1   Generating a Message
  924.  
  925.    This section describes the behavior of a SNMP protocol entity when it
  926.    communicates with a SNMP party for which the privacy protocol is
  927.    administratively specified as the Symmetric Privacy Protocol. Insofar
  928.    as the behavior of a SNMP protocol entity when transmitting a
  929.    protocol message is defined generically in [2], only those aspects of
  930.    that behavior that are specific to the Symmetric Privacy Protocol are
  931.    described below. In particular, this section describes the
  932.    encapsulation of a SNMP authenticated management communication into a
  933.    SNMP private management communication.
  934.  
  935.    According to [2], a SnmpPrivMsg value is constructed during Step 5 of
  936.    generic processing. In particular, it states the privData component
  937.    is constructed according to the privacy protocol identified for the
  938.    SNMP party receiving the message.  When the relevant privacy protocol
  939.    is the Symmetric Privacy Protocol, the procedure performed by a SNMP
  940.    protocol entity whenever a management communication is to be
  941.    transmitted by a SNMP party is as follows.
  942.  
  943.     1. If the SnmpAuthMsg value is not authenticated
  944.        according to the conventions of the Digest
  945.        Authentication Protocol, the generation of the private
  946.        management communication fails according to a local
  947.        procedure, without further processing.
  948.  
  949.     2. The local database is consulted to determine the private
  950.        privacy key of the SNMP party receiving the message
  951.  
  952.  
  953.  
  954. Galvin, McCloghrie, & Davin                                    [Page 17]
  955.  
  956. RFC 1352                SNMP Security Protocols                July 1992
  957.  
  958.  
  959.        (represented, for example, according to the conventions
  960.        defined in Section 2.4.2).
  961.  
  962.     3. The SnmpAuthMsg value is serialized according to the
  963.        conventions of [12] and [1].
  964.  
  965.     4. The octet sequence representing the serialized
  966.        SnmpAuthMsg value is encrypted using, for example,
  967.        the algorithm specified in Section 2.4.2 and the
  968.        extracted private privacy key.
  969.  
  970.     5. The privData component is set to the encrypted value.
  971.  
  972.       As set forth in [2], the SnmpPrivMsg value is then serialized
  973.       and transmitted to the receiving SNMP party.
  974.  
  975. 5.2   Receiving a Message
  976.  
  977.    This section describes the behavior of a SNMP protocol entity when it
  978.    acts as a SNMP party for which the privacy protocol is
  979.    administratively specified as the Symmetric Privacy Protocol. Insofar
  980.    as the behavior of a SNMP protocol entity when receiving a protocol
  981.    message is defined generically in [2], only those aspects of that
  982.    behavior that are specific to the Symmetric Privacy Protocol are
  983.    described below.
  984.  
  985.    According to [2], the privData component of a received SnmpPrivMsg
  986.    value is evaluated during Step 4 of generic processing. In
  987.    particular, it states the privData component is evaluated according
  988.    to the privacy protocol identified for the SNMP party receiving the
  989.    message. When the relevant privacy protocol is the Symmetric Privacy
  990.    Protocol, the procedure performed by a SNMP protocol entity whenever
  991.    a management communication is received by a SNMP party is as follows.
  992.  
  993.     1. The local database is consulted to determine the private
  994.        privacy key of the SNMP party receiving the message
  995.        (represented, for example, according to the conventions
  996.        defined in Section 2.4.2).
  997.  
  998.     2. The contents octets of the privData component are
  999.        decrypted using, for example, the algorithm specified in
  1000.        Section 2.4.2 and the extracted private privacy key.
  1001.  
  1002.       Processing of the received message continues as specified in [2].
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Galvin, McCloghrie, & Davin                                    [Page 18]
  1011.  
  1012. RFC 1352                SNMP Security Protocols                July 1992
  1013.  
  1014.  
  1015. 6.  Clock and Secret Distribution
  1016.  
  1017.    The protocols described in Sections 4 and 5 assume the existence of
  1018.    loosely synchronized clocks and shared secret values. Three
  1019.    requirements constrain the strategy by which clock values and secrets
  1020.    are distributed.
  1021.  
  1022.      o If the value of an authentication clock is decreased, the
  1023.        last-timestamp and private authentication key must be
  1024.        changed concurrently.
  1025.  
  1026.        When the value of an authentication clock is decreased,
  1027.        messages that have been sent with a timestamp value
  1028.        between the value of the authentication clock and its
  1029.        new value may be replayed. Changing the private
  1030.        authentication key obviates this threat. However,
  1031.        changing the authentication clock and the private
  1032.        authentication key is not sufficient to ensure proper
  1033.        operation. If the last-timestamp is not reduced similarly
  1034.        to the authentication clock, no message will be
  1035.        considered authentic until the value of the authentication
  1036.        clock exceeds the value of the last-timestamp.
  1037.  
  1038.      o The private authentication key and private privacy key
  1039.        must be known only to the parties requiring knowledge
  1040.        of them.
  1041.  
  1042.        Protecting the secrets from disclosure is critical to the
  1043.        security of the protocols. In particular, if the secrets are
  1044.        distributed via a network, the secrets must be protected
  1045.        with a protocol that supports confidentiality, e.g., the
  1046.        Symmetric Privacy Protocol. Further, knowledge of the
  1047.        secrets must be as restricted as possible within an
  1048.        implementation. In particular, although the secrets may
  1049.        be known to one or more persons during the initial
  1050.        configuration of a device, the secrets should be changed
  1051.        immediately after configuration such that their actual
  1052.        value is known only to the software. A management
  1053.        station has the additional responsibility of recovering the
  1054.        state of all parties whenever it boots, and it may address
  1055.        this responsibility by recording the secrets on a
  1056.        long-term storage device. Access to information on this
  1057.        device must be as restricted as is practically possible.
  1058.  
  1059.      o There must exist at least one SNMP protocol entity that
  1060.        assumes the role of a responsible management station.
  1061.  
  1062.        This management station is responsible for ensuring that
  1063.  
  1064.  
  1065.  
  1066. Galvin, McCloghrie, & Davin                                    [Page 19]
  1067.  
  1068. RFC 1352                SNMP Security Protocols                July 1992
  1069.  
  1070.  
  1071.        all authentication clocks are synchronized and for
  1072.        changing the secret values when necessary. Although
  1073.        more than one management station may share this
  1074.        responsibility, their coordination is essential to the
  1075.        secure management of the network. The mechanism by
  1076.        which multiple management stations ensure that no
  1077.        more than one of them attempts to synchronize the
  1078.        clocks or update the secrets at any one time is a local
  1079.        implementation issue.
  1080.  
  1081.        A responsible management station may either support
  1082.        clock synchronization and secret distribution as separate
  1083.        functions, or combine them into a single functional unit.
  1084.  
  1085.    The first section below specifies the procedures by which a SNMP
  1086.    protocol entity is initially configured. The next two sections
  1087.    describe one strategy for distributing clock values and one for
  1088.    determining a synchronized clock value among SNMP parties supporting
  1089.    the Digest Authentication Protocol. For SNMP parties supporting the
  1090.    Symmetric Privacy Protocol, the next section describes a strategy for
  1091.    distributing secret values. The last section specifies the procedures
  1092.    by which a SNMP protocol entity recovers from a "crash."
  1093.  
  1094. 6.1   Initial Configuration
  1095.  
  1096.    This section describes the initial configuration of a SNMP protocol
  1097.    entity that supports the Digest Authentication Protocol or both the
  1098.    Digest Authentication Protocol and the Symmetric Privacy Protocol.
  1099.  
  1100.    When a network device is first installed, its initial, secure
  1101.    configuration must be done manually, i.e., a person must physically
  1102.    visit the device and enter the initial secret values for at least its
  1103.    first secure SNMP party. This requirement suggests that the person
  1104.    will have knowledge of the initial secret values.
  1105.  
  1106.    In general, the security of a system is enhanced as the number of
  1107.    entities that know a secret is reduced. Requiring a person to
  1108.    physically visit a device every time a SNMP party is configured not
  1109.    only exposes the secrets unnecessarily but is administratively
  1110.    prohibitive. In particular, when MD5 is used, the initial
  1111.    authentication secret is 128 bits long and when DES is used an
  1112.    additional 128 bits are needed -- 64 bits each for the key and
  1113.    initialization vector. Clearly, these values will need to be recorded
  1114.    on a medium in order to be transported between a responsible
  1115.    management station and a managed agent. The recommended procedure is
  1116.    to configure a small set of initial SNMP parties for each SNMP
  1117.    protocol entity, one pair of which may be used initially to configure
  1118.    all other SNMP parties.
  1119.  
  1120.  
  1121.  
  1122. Galvin, McCloghrie, & Davin                                    [Page 20]
  1123.  
  1124. RFC 1352                SNMP Security Protocols                July 1992
  1125.  
  1126.  
  1127.    In fact, there is a minimal, useful set of SNMP parties that could be
  1128.    configured between each responsible management station and managed
  1129.    agent. This minimal set includes one of each of the following for
  1130.    both the responsible management station and the managed agent:
  1131.  
  1132.      o a SNMP party for which the authentication protocol and
  1133.        privacy protocol are the values noAuth and noPriv,
  1134.        respectively,
  1135.  
  1136.      o a SNMP party for which the authentication protocol
  1137.        identifies the mechanism defined in Section 2.4.1 and its
  1138.        privacy protocol is the value noPriv, and
  1139.  
  1140.      o a SNMP party for which the authentication protocol and
  1141.        privacy protocol identify the mechanisms defined in
  1142.        Section 2.4.1 and Section 2.4.2, respectively.
  1143.  
  1144.    The last of these SNMP parties in both the responsible management
  1145.    station and the managed agent could be used to configure all other
  1146.    SNMP parties. It is the only suitable party for this purpose because
  1147.    it is the only party that supports data confidentiality, which is
  1148.    necessary in order to protect the distributed secrets from disclosure
  1149.    to unauthorized entities.
  1150.  
  1151.    Configuring one pair of SNMP parties to be used to configure all
  1152.    other parties has the advantage of exposing only one pair of secrets
  1153.    -- the secrets used to configure the minimal, useful set identified
  1154.    above. To limit this exposure, the responsible management station
  1155.    should change these values as its first operation upon completion of
  1156.    the initial configuration. In this way, secrets are known only to the
  1157.    peers requiring knowledge of them in order to communicate.
  1158.  
  1159.    The Management Information Base (MIB) document [4] supporting these
  1160.    security protocols specifies 6 initial party identities and initial
  1161.    values, which, by convention, are assigned to the parties and their
  1162.    associated parameters.
  1163.  
  1164.    All 6 parties should be configured in each new managed agent and its
  1165.    responsible management station. The responsible management station
  1166.    should be configured first, since the management station can be used
  1167.    to generate the initial secrets and provide them to a person, on a
  1168.    suitable medium, for distribution to the managed agent. The following
  1169.    sequence of steps describes the initial configuration of a managed
  1170.    agent and its responsible management station.
  1171.  
  1172.     1. Determine the initial values for each of the attributes of
  1173.        the SNMP party to be configured. Some of these values
  1174.        may be computed by the responsible management
  1175.  
  1176.  
  1177.  
  1178. Galvin, McCloghrie, & Davin                                    [Page 21]
  1179.  
  1180. RFC 1352                SNMP Security Protocols                July 1992
  1181.  
  1182.  
  1183.        station, some may be specified in the MIB document,
  1184.        and some may be administratively determined.
  1185.  
  1186.     2. Configure the parties in the responsible management
  1187.        station, according to the set of initial values. If the
  1188.        management station is computing some initial values to
  1189.        be entered into the agent, an appropriate medium must
  1190.        be present to record the values.
  1191.  
  1192.     3. Configure the parties in the managed agent, according to
  1193.        the set of initial values.
  1194.  
  1195.     4. The responsible management station must synchronize
  1196.        the authentication clock values for each party it shares
  1197.        with each managed agent. Section 6.3 specifies one
  1198.        strategy by which this could be accomplished.
  1199.  
  1200.     5. The responsible management station should change the
  1201.        secret values manually configured to ensure the actual
  1202.        values are known only to the peers requiring knowledge
  1203.        of them in order to communicate. To do this, the
  1204.        management station generates new secrets for each party
  1205.        to be reconfigured and distributes those secrets with a
  1206.        strategy that uses a protocol that protects them from
  1207.        disclosure, e.g., Symmetric Privacy Protocol (see
  1208.        Section 6.4). Upon receiving positive acknowledgement
  1209.        that the new values have been distributed, the
  1210.        management station should update its local database
  1211.        with the new values.
  1212.  
  1213.    If the managed agent does not support a protocol that protects
  1214.    messages from disclosure, then automatic maintenance and
  1215.    configuration of parties is not possible, i.e., the last step above
  1216.    is not possible. The secrets can only be changed by a physical visit
  1217.    to the device.
  1218.  
  1219.    If there are other SNMP protocol entities requiring knowledge of the
  1220.    secrets, the responsible management station must distribute the
  1221.    information upon completion of the initial configuration. The
  1222.    mechanism used must protect the secrets from disclosure to
  1223.    unauthorized entities. The Symmetric Privacy Protocol, for example,
  1224.    is an acceptable mechanism.
  1225.  
  1226. 6.2   Clock Distribution
  1227.  
  1228.    A responsible management station must ensure that the authentication
  1229.    clock value for each SNMP party for which it is responsible
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Galvin, McCloghrie, & Davin                                    [Page 22]
  1235.  
  1236. RFC 1352                SNMP Security Protocols                July 1992
  1237.  
  1238.  
  1239.      o is loosely synchronized among all the local databases in
  1240.        which it appears,
  1241.  
  1242.      o is reset, as indicated below, upon reaching its maximal
  1243.        value, and
  1244.  
  1245.      o is non-decreasing, except as indicated below.
  1246.  
  1247.    The skew among the clock values must be accounted for in the lifetime
  1248.    value, in addition to the expected communication delivery delay.
  1249.  
  1250.    A skewed authentication clock may be detected by a number of
  1251.    strategies, including knowledge of the accuracy of the system clock,
  1252.    unauthenticated queries of the party database, and recognition of
  1253.    authentication failures originated by the party.
  1254.  
  1255.    Whenever clock skew is detected, and whenever the SNMP entities at
  1256.    both the responsible management station and the relevant managed
  1257.    agent support an appropriate privacy protocol (e.g., the Symmetric
  1258.    Privacy Protocol), a straightforward strategy for the correction of
  1259.    clock skew is simultaneous alteration of authentication clock and
  1260.    private key for the relevant SNMP party. If the request to alter the
  1261.    key and clock for a particular party originates from that same party,
  1262.    then, prior to transmitting that request, the local notion of the
  1263.    authentication clock is artificially advanced to assure acceptance of
  1264.    the request as authentic.
  1265.  
  1266.    More generally, however, since an authentication clock value need not
  1267.    be protected from disclosure, it is not necessary that a managed
  1268.    agent support a privacy protocol in order for a responsible
  1269.    management station to correct skewed clock values. The procedure for
  1270.    correcting clock skew in the general case is presented in Section
  1271.    6.3.
  1272.  
  1273.    In addition to correcting skewed notions of authentication clocks,
  1274.    every SNMP entity must react correctly as an authentication clock
  1275.    approaches its maximal value. If the authentication clock for a
  1276.    particular SNMP party ever reaches the maximal time value, the clock
  1277.    must halt at that value.  (The value of interest may be the maximum
  1278.    less lifetime.  When authenticating a message, its authentication
  1279.    timestamp is added to lifetime and compared to the authentication
  1280.    clock.  A SNMP protocol entity must guarantee that the sum is never
  1281.    greater than the maximal time value.) In this state, the only
  1282.    authenticated request a management station should generate for this
  1283.    party is one that alters the value of at least its authentication
  1284.    clock and private authentication key. In order to reset these values,
  1285.    the responsible management station may set the authentication
  1286.    timestamp in the message to the maximal time value. In this case, the
  1287.  
  1288.  
  1289.  
  1290. Galvin, McCloghrie, & Davin                                    [Page 23]
  1291.  
  1292. RFC 1352                SNMP Security Protocols                July 1992
  1293.  
  1294.  
  1295.    nonce value may be used to distinguish multiple messages.
  1296.  
  1297.    The value of the authentication clock for a particular SNMP party
  1298.    must never be altered such that its new value is less than its old
  1299.    value, unless its last-timestamp and private authentication key are
  1300.    also altered at the same time.
  1301.  
  1302. 6.3   Clock Synchronization
  1303.  
  1304.    Unless the secrets are changed at the same time, the correct way to
  1305.    synchronize clocks is to advance the slower clock to be equal to the
  1306.    faster clock. Suppose that party agentParty is realized by the SNMP
  1307.    entity in a managed agent; suppose that party mgrParty is realized by
  1308.    the SNMP entity in the corresponding responsible management station.
  1309.    For any pair of parties, there are four possible conditions of the
  1310.    authentication clocks that could require correction:
  1311.  
  1312.     1. The management station's notion of the value of the
  1313.        authentication clock for agentParty exceeds the agent's
  1314.        notion.
  1315.  
  1316.     2. The management station's notion of the value of the
  1317.        authentication clock for mgrParty exceeds the agent's
  1318.        notion.
  1319.  
  1320.     3. The agent's notion of the value of the authentication
  1321.        clock for agentParty exceeds the management station's
  1322.        notion.
  1323.  
  1324.     4. The agent's notion of the value of the authentication
  1325.        clock for mgrParty exceeds the management station's
  1326.        notion.
  1327.  
  1328.    The selective clock acceleration mechanism intrinsic to the protocol
  1329.    corrects conditions 2 and 3 as part of the normal processing of an
  1330.    authentic message. Therefore, the clock adjustment procedure below
  1331.    does not provide for any adjustments in those cases. Rather, the
  1332.    following sequence of steps specifies how the clocks may be
  1333.    synchronized when condition 1, condition 4, or both of those
  1334.    conditions are manifest.
  1335.  
  1336.     1. The responsible management station saves its existing
  1337.        notions of the authentication clocks for the two parties
  1338.        agentParty and mgrParty.
  1339.  
  1340.     2. The responsible management station retrieves the
  1341.        authentication clock values for both agentParty and
  1342.        mgrParty from the agent. This retrieval must be an
  1343.  
  1344.  
  1345.  
  1346. Galvin, McCloghrie, & Davin                                    [Page 24]
  1347.  
  1348. RFC 1352                SNMP Security Protocols                July 1992
  1349.  
  1350.  
  1351.        unauthenticated request, since the management station
  1352.        does not know if the clocks are synchronized. If the
  1353.        request fails, the clocks cannot be synchronized, and the
  1354.        clock adjustment procedure is aborted without further
  1355.        processing.
  1356.  
  1357.     3. If the management station's notion of the authentication
  1358.        clock for agentParty exceeds the notion just retrieved
  1359.        from the agent by more than the amount of the
  1360.        communications delay between the two protocol entities,
  1361.        then condition 1 is manifest. The recommended estimate
  1362.        of communication delay in this context is one half of the
  1363.        lifetime value recorded for agentParty.
  1364.  
  1365.     4. If the notion of the authentication clock for mgrParty
  1366.        just retrieved from the agent exceeds the management
  1367.        station's notion, then condition 4 is manifest, and the
  1368.        responsible management station advances its notion of
  1369.        the authentication clock for mgrParty to match the
  1370.        agent's notion.
  1371.  
  1372.     5. If condition 1 is manifest, then the responsible
  1373.        management station sends an authenticated
  1374.        management operation to the agent that advances the
  1375.        agent's notion of the authentication clock for
  1376.        agentParty to be equal to the management station's
  1377.        notion. If this management operation fails, then the
  1378.        management station restores its previously saved notions
  1379.        of the clock values, and the clock adjustment procedure
  1380.        is aborted without further processing.
  1381.  
  1382.     6. The responsible management station retrieves the
  1383.        authentication clock values for both agentParty and
  1384.        mgrParty from the agent. This retrieval must be an
  1385.        authenticated request, in order that the management
  1386.        station may verify that the clock values are properly
  1387.        synchronized. If this authenticated query fails, then the
  1388.        management station restores its previously saved notions
  1389.        of the clock values, and the clock adjustment procedure
  1390.        is aborted without further processing. Otherwise, clock
  1391.        synchronization has been successfully realized.
  1392.  
  1393.    It is important to note step 4 above must be completed before
  1394.    attempting step 5. Otherwise, the agent may evaluate the request in
  1395.    step 5 as unauthentic. Similarly, step 5 above must be completed
  1396.    before attempting step 6. Otherwise, the management station may
  1397.    evaluate the query response in step 6 as unauthentic.
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Galvin, McCloghrie, & Davin                                    [Page 25]
  1403.  
  1404. RFC 1352                SNMP Security Protocols                July 1992
  1405.  
  1406.  
  1407.    Administrative advancement of a clock as described above does not
  1408.    introduce any new vulnerabilities, since the value of the clock is
  1409.    intended to increase with the passage of time. A potential
  1410.    operational problem is the rejection of management operations that
  1411.    are authenticated using a previous value of the relevant party clock.
  1412.    This possibility may be avoided if a management station suppresses
  1413.    generation of management traffic between relevant parties while this
  1414.    clock adjustment procedure is in progress.
  1415.  
  1416. 6.4   Secret Distribution
  1417.  
  1418.    This section describes one strategy by which a SNMP protocol entity
  1419.    that supports both the Digest Authentication Protocol and the
  1420.    Symmetric Privacy Protocol can change the secrets for a particular
  1421.    SNMP party.
  1422.  
  1423.    The frequency with which the secrets of a SNMP party should be
  1424.    changed is a local administrative issue. However, the more frequently
  1425.    a secret is used, the more frequently it should be changed. At a
  1426.    minimum, the secrets must be changed whenever the associated
  1427.    authentication clock approaches its maximal value (see Section 7).
  1428.    Note that, owing to both administrative and automatic advances of the
  1429.    authentication clock described in this memo, the authentication clock
  1430.    for a SNMP party may well approach its maximal value sooner than
  1431.    might otherwise be expected.
  1432.  
  1433.    The following sequence of steps specifies how a responsible
  1434.    management station alters a secret value (i.e., the private
  1435.    authentication key or the private privacy key) for a particular SNMP
  1436.    party.
  1437.  
  1438.     1. The responsible management station generates a new
  1439.        secret value.
  1440.  
  1441.     2. The responsible management station encapsulates a
  1442.        SNMP Set request in a SNMP private management
  1443.        communication with at least the following properties.
  1444.  
  1445.         o Its source supports the Digest Authentication
  1446.           Protocol and the Symmetric Privacy Protocol.
  1447.  
  1448.         o Its destination supports the Symmetric Privacy
  1449.           Protocol and the Digest Authentication Protocol.
  1450.  
  1451.     3. The SNMP private management communication is
  1452.        transmitted to its destination.
  1453.  
  1454.     4. Upon receiving the request, the recipient processes the
  1455.  
  1456.  
  1457.  
  1458. Galvin, McCloghrie, & Davin                                    [Page 26]
  1459.  
  1460. RFC 1352                SNMP Security Protocols                July 1992
  1461.  
  1462.  
  1463.        message according to [1] and [2].
  1464.  
  1465.     5. The recipient encapsulates a SNMP Set response in a
  1466.        SNMP private management communication with at least
  1467.        the following properties.
  1468.  
  1469.         o Its source supports the Digest Authentication
  1470.           Protocol and the Symmetric Privacy Protocol.
  1471.  
  1472.         o Its destination supports the Symmetric Privacy
  1473.           Protocol and the Digest Authentication Protocol.
  1474.  
  1475.     6. The SNMP private management communication is
  1476.        transmitted to its destination.
  1477.  
  1478.     7. Upon receiving the response, the responsible
  1479.        management station updates its local database with the
  1480.        new value.
  1481.  
  1482.    If the responsible management station does not receive a response to
  1483.    its request, there are two possible causes.
  1484.  
  1485.      o The request may not have been delivered to the
  1486.        destination.
  1487.  
  1488.      o The response may not have been delivered to the
  1489.        originator of the request.
  1490.  
  1491.    In order to distinguish the two possible error conditions, a
  1492.    responsible management station could check the destination to see if
  1493.    the change has occurred. Unfortunately, since the secret values are
  1494.    unreadable, this is not directly possible.
  1495.  
  1496.    The recommended strategy for verifying key changes is to set the
  1497.    public value corresponding to the secret being changed to a
  1498.    recognizable, novel value: that is, alter the public authentication
  1499.    key value for the relevant party when changing its private
  1500.    authentication key, or alter its public privacy key value when
  1501.    changing its private privacy key. In this way, the responsible
  1502.    management station may retrieve the public value when a response is
  1503.    not received, and verify whether or not the change has taken place.
  1504.    (This strategy is available since the public values are not used by
  1505.    the protocols defined in this memo. If this strategy is employed,
  1506.    then the public values are significant in this context. Of course,
  1507.    protocols using the public values may make use of this strategy
  1508.    directly.)
  1509.  
  1510.    One other scenario worthy of mention is using a SNMP party to change
  1511.  
  1512.  
  1513.  
  1514. Galvin, McCloghrie, & Davin                                    [Page 27]
  1515.  
  1516. RFC 1352                SNMP Security Protocols                July 1992
  1517.  
  1518.  
  1519.    its own secrets. In this case, the destination will change its local
  1520.    database prior to generating a response. Thus, the response will be
  1521.    constructed according to the new value.  However, the responsible
  1522.    management station will not update its local database until after the
  1523.    response is received. This suggests the responsible management
  1524.    station may receive a response which will be evaluated as
  1525.    unauthentic, unless the correct secret is used. The responsible
  1526.    management station may either account for this scenario as a special
  1527.    case, or use an alteration of the relevant public values (as
  1528.    described above) to verify the key change.
  1529.  
  1530.    Note, during the period of time after the request has been sent and
  1531.    before the response is received, the management station must keep
  1532.    track of both the old and new secret values. Since the delay may be
  1533.    the result of a network failure, the management station must be
  1534.    prepared to retain both values for an extended period of time,
  1535.    including across reboots.
  1536.  
  1537. 6.5   Crash Recovery
  1538.  
  1539.    This section describes the requirements for SNMP protocol entities in
  1540.    connection with recovery from system crashes or other service
  1541.    interruptions.
  1542.  
  1543.    For each SNMP party in the local database for a particular SNMP
  1544.    protocol entity, its identity, authentication clock, private
  1545.    authentication key, and private privacy key must enjoy non-volatile,
  1546.    incorruptible representations. If possible, lifetime should also
  1547.    enjoy a non-volatile, incorruptible representation.  If said protocol
  1548.    entity supports other security protocols or algorithms in addition to
  1549.    the two defined in this memo, then the authentication protocol and
  1550.    the privacy protocol for each party also require non-volatile,
  1551.    incorruptible representation.
  1552.  
  1553.    The authentication clock of a SNMP party is a critical component of
  1554.    the overall security of the protocols. The inclusion of a reliable
  1555.    representation of a clock in a SNMP protocol entity enhances overall
  1556.    security. A reliable clock representation continues to increase
  1557.    according to the passage of time, even when the local SNMP protocol
  1558.    entity -- due to power loss or other system failure -- may not be
  1559.    operating.  An example of a reliable clock representation is that
  1560.    provided by battery-powered clock-calendar devices incorporated into
  1561.    some contemporary systems. It is assumed that management stations
  1562.    always support reliable clock representations, where clock adjustment
  1563.    by a human operator during crash recovery may contribute to that
  1564.    reliability.
  1565.  
  1566.    If a managed agent crashes and does not reboot in time for its
  1567.  
  1568.  
  1569.  
  1570. Galvin, McCloghrie, & Davin                                    [Page 28]
  1571.  
  1572. RFC 1352                SNMP Security Protocols                July 1992
  1573.  
  1574.  
  1575.    responsible management station to prevent its authentication clock
  1576.    from reaching its maximal value, upon reboot the clock must be halted
  1577.    at its maximal value. The procedures specified in Section 6.3 would
  1578.    then apply.
  1579.  
  1580.    If a managed network element supports a reliable clock
  1581.    representation, recovering from a crash requires few special actions.
  1582.    Upon recovery, those attributes of each SNMP party that do not enjoy
  1583.    non-volatile or reliable representation are initialized as follows.
  1584.  
  1585.      o If the private authentication key is not the OCTET
  1586.        STRING of zero length, the authentication protocol is
  1587.        set to identify use of the Digest Authentication Protocol
  1588.        in conjunction with the algorithm specified in
  1589.        Section 2.4.1.
  1590.  
  1591.      o The last-timestamp is initialized to the value of the
  1592.        authentication clock.
  1593.  
  1594.      o The nonce is initialized to zero.
  1595.  
  1596.      o If the lifetime is not retained, it should be initialized to
  1597.        zero.
  1598.  
  1599.      o If the private privacy key is not the OCTET STRING
  1600.        of zero length, the privacy protocol is set to identify use
  1601.        of the Symmetric Privacy Protocol in conjunction with
  1602.        the algorithm specified in Section 2.4.2.
  1603.  
  1604.    Upon detecting that a managed agent has rebooted, a responsible
  1605.    management station must reset all other party attributes, including
  1606.    the lifetime if it was not retained. In order to reset the lifetime,
  1607.    the responsible management station should set the authentication
  1608.    timestamp in the message to the sum of the authentication clock and
  1609.    desired lifetime. This is an artificial advancement of the
  1610.    authentication timestamp in order to guarantee the message will be
  1611.    authentic when received by the recipient.
  1612.  
  1613.    If, alternatively, a managed network element does not support a
  1614.    reliable clock representation, then those attributes of each SNMP
  1615.    party that do not enjoy non-volatile representation are initialized
  1616.    as follows.
  1617.  
  1618.      o If the private authentication key is not the OCTET
  1619.        STRING of zero length, the authentication protocol is
  1620.        set to identify use of the Digest Authentication Protocol
  1621.        in conjunction with the algorithm specified in
  1622.        Section 2.4.1.
  1623.  
  1624.  
  1625.  
  1626. Galvin, McCloghrie, & Davin                                    [Page 29]
  1627.  
  1628. RFC 1352                SNMP Security Protocols                July 1992
  1629.  
  1630.  
  1631.      o The authentication clock is initialized to the maximal
  1632.        time value.
  1633.  
  1634.      o The last-timestamp is initialized to the maximal time
  1635.        value.
  1636.  
  1637.      o The nonce is initialized to zero.
  1638.  
  1639.      o If the lifetime is not retained, it should be initialized to
  1640.        zero.
  1641.  
  1642.      o If the private privacy key is not the OCTET STRING
  1643.        of zero length, the privacy protocol is set to identify use
  1644.        of the Symmetric Privacy Protocol in conjunction with
  1645.        the algorithm specified in Section 2.4.2.
  1646.  
  1647.    The only authenticated request a management station should generate
  1648.    for a party in this initial state is one that alters the value of at
  1649.    least its authentication clock, private authentication key, and
  1650.    lifetime (if that was not retained). In order to reset these values,
  1651.    the responsible management station must set the authentication
  1652.    timestamp in the message to the maximal time value. The nonce value
  1653.    may be used to distinguish multiple messages.
  1654.  
  1655. 7.  Security Considerations
  1656.  
  1657.    This section highlights security considerations relevant to the
  1658.    protocols and procedures defined in this memo. Practices that
  1659.    contribute to secure, effective operation of the mechanisms defined
  1660.    here are described first. Constraints on implementation behavior that
  1661.    are necessary to the security of the system are presented next.
  1662.    Finally, an informal account of the contribution of each mechanism of
  1663.    the protocols to the required goals is presented.
  1664.  
  1665. 7.1   Recommended Practices
  1666.  
  1667.    This section describes practices that contribute to the secure,
  1668.    effective operation of the mechanisms defined in this memo.
  1669.  
  1670.      o A management station should discard SNMP responses
  1671.        for which neither the request-id component nor the
  1672.        represented management information corresponds to any
  1673.        currently outstanding request.
  1674.  
  1675.        Although it would be typical for a management station
  1676.        to do this as a matter of course, in the context of these
  1677.        security protocols it is significant owing to the possibility
  1678.        of message duplication (malicious or otherwise).
  1679.  
  1680.  
  1681.  
  1682. Galvin, McCloghrie, & Davin                                    [Page 30]
  1683.  
  1684. RFC 1352                SNMP Security Protocols                July 1992
  1685.  
  1686.  
  1687.      o A management station should not interpret an agent's
  1688.        lack of response to an authenticated SNMP management
  1689.        communication as a conclusive indication of agent or
  1690.        network failure.
  1691.  
  1692.        It is possible for authentication failure traps to be lost or
  1693.        suppressed as a result of authentication clock skew or
  1694.        inconsistent notions of shared secrets. In order either to
  1695.        facilitate administration of such SNMP parties or to
  1696.        provide for continued management in times of network
  1697.        stress, a management station implementation may
  1698.        provide for arbitrary, artificial advancement of the
  1699.        timestamp or selection of shared secrets on locally
  1700.        generated messages.
  1701.  
  1702.      o The lifetime value for a SNMP party should be chosen
  1703.        (by the local administration) to be as small as possible,
  1704.        given the accuracy of clock devices available, relevant
  1705.        round-trip communications delays, and the frequency
  1706.        with which a responsible management station will be
  1707.        able to verify all clock values.
  1708.  
  1709.        A large lifetime increases the vulnerability to malicious
  1710.        delays of SNMP messages. The implementation of a
  1711.        management station may, when explicitly authorized,
  1712.        provide for dynamic adjustment of the lifetime in order
  1713.        to accommodate changing network conditions.
  1714.  
  1715.      o When sending state altering messages to a managed
  1716.        agent, a management station should delay sending
  1717.        successive messages to the managed agent until a
  1718.        positive acknowledgement is received for the previous
  1719.        message or until the previous message expires.
  1720.  
  1721.        When using the noAuth protocol, no message ordering
  1722.        is imposed by the SNMP. Messages may be received in
  1723.        any order relative to their time of generation and each
  1724.        will be processed in the ordered received. In contrast,
  1725.        the security protocols guarantee that received messages
  1726.        are ordered insofar as each received message must have
  1727.        been sent subsequent to the sending of a previously
  1728.        received message.
  1729.  
  1730.        When an authenticated message is sent to a managed
  1731.        agent, it will be valid for a period of time that does not
  1732.        exceed lifetime under normal circumstances. During the
  1733.        period of time this message is valid, if the management
  1734.        station sends another authenticated message to the
  1735.  
  1736.  
  1737.  
  1738. Galvin, McCloghrie, & Davin                                    [Page 31]
  1739.  
  1740. RFC 1352                SNMP Security Protocols                July 1992
  1741.  
  1742.  
  1743.        managed agent that is received and processed prior to
  1744.        the first message, the first message will be considered
  1745.        unauthentic when it is received by the managed agent.
  1746.  
  1747.        Indeed, a management station must cope with the loss
  1748.        and re-ordering of messages resulting from anomalies in
  1749.        the network as a matter of course. A management
  1750.        station implementation may choose to prevent the loss
  1751.        of messages resulting from re-ordering when using the
  1752.        security protocols defined in this memo by delaying
  1753.        sending successive messages.
  1754.  
  1755.      o The frequency with which the secrets of a SNMP party
  1756.        should be changed is indirectly related to the frequency
  1757.        of their use.
  1758.  
  1759.        Protecting the secrets from disclosure is critical to the
  1760.        overall security of the protocols. Frequent use of a secret
  1761.        provides a continued source of data that may be useful
  1762.        to a cryptanalyst in exploiting known or perceived
  1763.        weaknesses in an algorithm. Frequent changes to the
  1764.        secret avoid this vulnerability.
  1765.  
  1766.        Changing a secret after each use is is generally regarded
  1767.        as the most secure practice, but a significant amount of
  1768.        overhead may be associated with that approach.
  1769.  
  1770.        Note, too, in a local environment the threat of disclosure
  1771.        may be insignificant, and as such the changing of secrets
  1772.        may be less frequent. However, when public data
  1773.        networks are the communication paths, more caution is
  1774.        prudent.
  1775.  
  1776.      o In order to foster the greatest degree of security, a
  1777.        management station implementation must support
  1778.        constrained, pairwise sharing of secrets among SNMP
  1779.        entities as its default mode of operation.
  1780.  
  1781.        Owing to the use of symmetric cryptography in the
  1782.        protocols defined here, the secrets associated with a
  1783.        particular SNMP party must be known to all other
  1784.        SNMP parties with which that party may wish to
  1785.        communicate. As the number of locations at which
  1786.        secrets are known and used increases, the likelihood of
  1787.        their disclosure also increases, as does the potential
  1788.        impact of that disclosure. Moreover, if the set of SNMP
  1789.        protocol entities with knowledge of a particular secret
  1790.        numbers more than two, data origin cannot be reliably
  1791.  
  1792.  
  1793.  
  1794. Galvin, McCloghrie, & Davin                                    [Page 32]
  1795.  
  1796. RFC 1352                SNMP Security Protocols                July 1992
  1797.  
  1798.  
  1799.        authenticated because it is impossible to determine with
  1800.        any assurance which entity of that set may be the
  1801.        originator of a particular SNMP message. Thus, the
  1802.        greatest degree of security is afforded by configurations
  1803.        in which the secrets for each SNMP party are known to
  1804.        at most two protocol entities.
  1805.  
  1806. 7.2   Conformance
  1807.  
  1808.    A SNMP protocol entity implementation that claims conformance to this
  1809.    memo must satisfy the following requirements:
  1810.  
  1811.     1. It must implement the noAuth and noPriv protocols
  1812.        whose object identifiers are defined in [4].
  1813.  
  1814.        noAuth  This protocol signifies that messages generated
  1815.           by a party using it are not protected as to origin or
  1816.           integrity. It is required to ensure that a party's
  1817.           authentication clock is always accessible.
  1818.        noPriv  This protocol signifies that messages received
  1819.           by a party using it are not protected from
  1820.           disclosure. It is required to ensure that a party's
  1821.           authentication clock is always accessible.
  1822.  
  1823.     2. It must implement the Digest Authentication Protocol in
  1824.        conjunction with the algorithm defined in Section 2.4.1.
  1825.  
  1826.     3. It must include in its local database at least one SNMP
  1827.        party with the following parameters set as follows:
  1828.  
  1829.         o partyAuthProtocol is set to noAuth and
  1830.         o partyPrivProtocol is set to noPriv.
  1831.  
  1832.        This party must have a MIB view [2] specified that
  1833.        includes at least the authentication clock of all other
  1834.        parties. Alternatively, the authentication clocks of the
  1835.        other parties may be partitioned among several similarly
  1836.        configured parties according to a local implementation
  1837.        convention.
  1838.  
  1839.     4. For each SNMP party about which it maintains
  1840.        information in a local database, an implementation must
  1841.        satisfy the following requirements:
  1842.  
  1843.       (a) It must not allow a party's parameters to be set to
  1844.           a value inconsistent with its expected syntax. In
  1845.           particular, Section 2.4 specifies constraints for the
  1846.           chosen mechanisms.
  1847.  
  1848.  
  1849.  
  1850. Galvin, McCloghrie, & Davin                                    [Page 33]
  1851.  
  1852. RFC 1352                SNMP Security Protocols                July 1992
  1853.  
  1854.  
  1855.       (b) It must, to the maximal extent possible, prohibit
  1856.           read-access to the private authentication key and
  1857.           private encryption key under all circumstances
  1858.           except as required to generate and/or validate
  1859.           SNMP messages with respect to that party. This
  1860.           prohibition includes prevention of read-access by
  1861.           the entity's human operators.
  1862.       (c) It must allow the party's authentication clock to be
  1863.           publicly accessible. The correct operation of the
  1864.           Digest Authentication Protocol requires that it be
  1865.           possible to determine this value at all times in
  1866.           order to guarantee that skewed authentication
  1867.           clocks can be resynchronized.
  1868.       (d) It must prohibit alterations to its record of the
  1869.           authentication clock for that party independently of
  1870.           alterations to its record of the private
  1871.           authentication key (unless the clock alteration is an
  1872.           advancement).
  1873.       (e) It must never allow its record of the authentication
  1874.           clock for that party to be incremented beyond the
  1875.           maximal time value and so "roll-over" to zero.
  1876.       (f) It must never increase its record of the lifetime for
  1877.           that party except as may be explicitly authorized
  1878.           (via imperative command or securely represented
  1879.           configuration information) by the responsible
  1880.           network administrator.
  1881.       (g) In the event that the non-volatile, incorruptible
  1882.           representations of a party's parameters (in
  1883.           particular, either the private authentication key or
  1884.           private encryption key) are lost or destroyed, it
  1885.           must alter its record of these quantities to random
  1886.           values so subsequent interaction with that party
  1887.           requires manual redistribution of new secrets and
  1888.           other parameters.
  1889.  
  1890.     5. If it selects new value(s) for a party's secret(s), it must
  1891.        avoid bad or obvious choices for said secret(s). Choices
  1892.        to be avoided are boundary values (such as all-zeros)
  1893.        and predictable values (such as the same value as
  1894.        previously or selecting from a predetermined set).
  1895.  
  1896. 7.3   Protocol Correctness
  1897.  
  1898.    The correctness of these SNMP security protocols with respect to the
  1899.    stated goals depends on the following assumptions:
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906. Galvin, McCloghrie, & Davin                                    [Page 34]
  1907.  
  1908. RFC 1352                SNMP Security Protocols                July 1992
  1909.  
  1910.  
  1911.     1. The chosen message digest algorithm satisfies its design
  1912.        criteria. In particular, it must be computationally
  1913.        infeasible to discover two messages that share the same
  1914.        digest value.
  1915.  
  1916.     2. It is computationally infeasible to determine the secret
  1917.        used in calculating a digest on the concatenation of the
  1918.        secret and a message when both the digest and the
  1919.        message are known.
  1920.  
  1921.     3. The chosen symmetric encryption algorithm satisfies its
  1922.        design criteria. In particular, it must be computationally
  1923.        infeasible to determine the cleartext message from the
  1924.        ciphertext message without knowledge of the key used in
  1925.        the transformation.
  1926.  
  1927.     4. Local notions of a party's authentication clock while it is
  1928.        associated with a specific private key value are
  1929.        monotonically non-decreasing (i.e., they never run
  1930.        backwards) in the absence of administrative
  1931.        manipulations.
  1932.  
  1933.     5. The secrets for a particular SNMP party are known only
  1934.        to authorized SNMP protocol entities.
  1935.  
  1936.     6. Local notions of the authentication clock for a particular
  1937.        SNMP party are never altered such that the
  1938.        authentication clock's new value is less than the current
  1939.        value without also altering the private authentication
  1940.        key.
  1941.  
  1942.    For each mechanism of the protocol, an informal account of its
  1943.    contribution to the required goals is presented below.  Pseudocode
  1944.    fragments are provided where appropriate to exemplify possible
  1945.    implementations; they are intended to be self-explanatory.
  1946.  
  1947. 7.3.1   Clock Monotonicity Mechanism
  1948.  
  1949.    By pairing each sequence of a clock's values with a unique key, the
  1950.    protocols partially realize goals 3 and 4, and the conjunction of
  1951.    this property with assumption 6 above is sufficient for the claim
  1952.    that, with respect to a specific private key value, all local notions
  1953.    of a party's authentication clock are, in general, non-decreasing
  1954.    with time.
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Galvin, McCloghrie, & Davin                                    [Page 35]
  1963.  
  1964. RFC 1352                SNMP Security Protocols                July 1992
  1965.  
  1966.  
  1967. 7.3.2   Data Integrity Mechanism
  1968.  
  1969.    The protocols require computation of a message digest computed over
  1970.    the SNMP message prepended by the secret for the relevant party. By
  1971.    virtue of this mechanism and assumptions 1 and 2, the protocols
  1972.    realize goal 1.
  1973.  
  1974.    Normally, the inclusion of the message digest value with the digested
  1975.    message would not be sufficient to guarantee data integrity, since
  1976.    the digest value can be modified in addition to the message while it
  1977.    is enroute. However, since not all of the digested message is
  1978.    included in the transmission to the destination, it is not possible
  1979.    to substitute both a message and a digest value while enroute to a
  1980.    destination.
  1981.  
  1982.    Strictly speaking, the specified strategy for data integrity does not
  1983.    detect a SNMP message modification which appends extraneous material
  1984.    to the end of such messages. However, owing to the representation of
  1985.    SNMP messages as ASN.1 values, such modifications cannot --
  1986.    consistent with goal 1 -- result in unauthorized management
  1987.    operations.
  1988.  
  1989.    The data integrity mechanism specified in this memo protects only
  1990.    against unauthorized modification of individual SNMP messages. A more
  1991.    general data integrity service that affords protection against the
  1992.    threat of message stream modification is not realized by this
  1993.    mechanism, although limited protection against reordering, delay, and
  1994.    duplication of messages within a message stream are provided by other
  1995.    mechanisms of the protocol.
  1996.  
  1997. 7.3.3   Data Origin Authentication Mechanism
  1998.  
  1999.    The data integrity mechanism requires the use of a secret value known
  2000.    only to communicating parties. By virtue of this mechanism and
  2001.    assumptions 1 and 2, the protocols explicitly prevent unauthorized
  2002.    modification of messages. Data origin authentication is implicit if
  2003.    the message digest value can be verified. That is, the protocols
  2004.    realize goal 2.
  2005.  
  2006. 7.3.4   Restricted Administration Mechanism
  2007.  
  2008.    This memo requires that implementations preclude administrative
  2009.    alterations of the authentication clock for a particular party
  2010.    independently from its private authentication key (unless that clock
  2011.    alteration is an advancement). An example of an efficient
  2012.    implementation of this restriction is provided in a pseudocode
  2013.    fragment below. This pseudocode fragment meets the requirements of
  2014.    assumption 6.
  2015.  
  2016.  
  2017.  
  2018. Galvin, McCloghrie, & Davin                                    [Page 36]
  2019.  
  2020. RFC 1352                SNMP Security Protocols                July 1992
  2021.  
  2022.  
  2023.    Pseudocode Fragment. Observe that the requirement is not for
  2024.    simultaneous alteration but to preclude independent alteration. This
  2025.    latter requirement is fairly easily realized in a way that is
  2026.    consistent with the defined semantics of the SNMP Set operation.
  2027.  
  2028.  
  2029.    Void partySetKey (party, newKeyValue)
  2030.    {
  2031.        if (party->clockAltered) {
  2032.           party->clockAltered = FALSE;
  2033.           party->keyAltered = FALSE;
  2034.           party->keyInUse = newKeyValue;
  2035.           party->clockInUse = party->clockCache;
  2036.        }
  2037.        else {
  2038.           party->keyAltered = TRUE;
  2039.           party->keyCache = newKeyValue;
  2040.        }
  2041.    }
  2042.  
  2043.    Void partySetClock (party, newClockValue)
  2044.    {
  2045.        if (party->keyAltered) {
  2046.           party->keyAltered = FALSE;
  2047.           party->clockAltered = FALSE;
  2048.           party->clockInUse = newClockValue;
  2049.           party->keyInUse = party->keyCache;
  2050.        }
  2051.        else {
  2052.           party->clockAltered = TRUE;
  2053.           party->clockCache = newClockValue;
  2054.        }
  2055.    }
  2056.  
  2057.  
  2058. 7.3.5   Ordered Delivery Mechanism
  2059.  
  2060.    The definition of the Digest Authentication Protocol requires that,
  2061.    if the timestamp value on a received message does not exceed the
  2062.    timestamp of the most recent validated message locally delivered from
  2063.    the originating party, then that message is not delivered. Otherwise,
  2064.    the record of the timestamp for the most recent locally delivered
  2065.    validated message is updated.
  2066.  
  2067.  
  2068.    if (msgIsValidated) {
  2069.        if (timestampOfReceivedMsg >
  2070.           party->timestampOfLastDeliveredMsg) {
  2071.  
  2072.  
  2073.  
  2074. Galvin, McCloghrie, & Davin                                    [Page 37]
  2075.  
  2076. RFC 1352                SNMP Security Protocols                July 1992
  2077.  
  2078.  
  2079.           party->timestampOfLastDeliveredMsg =
  2080.              timestampOfReceivedMsg;
  2081.        }
  2082.        else {
  2083.           msgIsValidated = FALSE;
  2084.        }
  2085.    }
  2086.  
  2087.  
  2088.    Although not explicitly represented in the pseudocode above, in the
  2089.    Digest Authentication Protocol, the ordered delivery mechanism must
  2090.    ensure that, when the authentication timestamp of the received
  2091.    message is equal to the last-timestamp, received messages continue to
  2092.    be delivered as long as their nonce values are monotonically
  2093.    increasing. By virtue of this mechanism, the protocols realize goal
  2094.    4.
  2095.  
  2096. 7.3.6   Message Timeliness Mechanism
  2097.  
  2098.    The definition of the SNMP security protocols requires that, if the
  2099.    authentication timestamp value on a received message -- augmented by
  2100.    an administratively chosen lifetime value -- is less than the local
  2101.    notion of the clock for the originating SNMP party, the message is
  2102.    not delivered.
  2103.  
  2104.  
  2105.    if (timestampOfReceivedMsg +
  2106.           party->administrativeLifetime <=
  2107.           party->localNotionOfClock) {
  2108.           msgIsValidated = FALSE;
  2109.    }
  2110.  
  2111.  
  2112.    By virtue of this mechanism, the protocols realize goal 3. In cases
  2113.    in which the local notions of a particular SNMP party clock are
  2114.    moderately well-synchronized, the timeliness mechanism effectively
  2115.    limits the age of validly delivered messages. Thus, if an attacker
  2116.    diverts all validated messages for replay much later, the delay
  2117.    introduced by this attack is limited to a period that is proportional
  2118.    to the skew among local notions of the party clock.
  2119.  
  2120. 7.3.7   Selective Clock Acceleration Mechanism
  2121.  
  2122.    The definition of the SNMP security protocols requires that, if the
  2123.    timestamp value on a received, validated message exceeds the local
  2124.    notion of the clock for the originating party, then that notion is
  2125.    adjusted forward to correspond to said timestamp value. This
  2126.    mechanism is neither strictly necessary nor sufficient to the
  2127.  
  2128.  
  2129.  
  2130. Galvin, McCloghrie, & Davin                                    [Page 38]
  2131.  
  2132. RFC 1352                SNMP Security Protocols                July 1992
  2133.  
  2134.  
  2135.    security of the protocol; rather, it fosters the clock
  2136.    synchronization on which valid message delivery depends -- thereby
  2137.    enhancing the effectiveness of the protocol in a management context.
  2138.  
  2139.  
  2140.    if (msgIsValidated) {
  2141.           if (timestampOfReceivedMsg >
  2142.                 party->localNotionOfClock) {
  2143.                 party->localNotionOfClock =
  2144.                       timestampOfReceivedMsg;
  2145.           }
  2146.    }
  2147.  
  2148.  
  2149.    The effect of this mechanism is to synchronize local notions of the
  2150.    party clock more closely in the case where a sender's notion is more
  2151.    advanced than a receiver's. In the opposite case, this mechanism has
  2152.    no effect on local notions of the party clock and either the received
  2153.    message is validly delivered or not according to other mechanisms of
  2154.    the protocol.
  2155.  
  2156.    Operation of this mechanism does not, in general, improve the
  2157.    probability of validated delivery for messages generated by party
  2158.    participants whose local notion of the party clock is relatively less
  2159.    advanced. In this case, queries from a management station may not be
  2160.    validly delivered and the management station needs to react
  2161.    appropriately (e.g., by administratively resynchronizing local
  2162.    notions of the clock in conjunction with a key change). In contrast,
  2163.    the delivery of SNMP trap messages generated by an agent that suffers
  2164.    from a less advanced notion of a party clock is more problematic, for
  2165.    an agent may lack the capacity to recognize and react to security
  2166.    failures that prevent delivery of its messages. Thus, the inherently
  2167.    unreliable character of trap messages is likely to be compounded by
  2168.    attempts to provide for their validated delivery.
  2169.  
  2170. 7.3.8   Confidentiality Mechanism
  2171.  
  2172.    The protocols require the use of a symmetric encryption algorithm
  2173.    when the data confidentiality service is required. By virtue of this
  2174.    mechanism and assumption 3, the protocols realize goal 5.
  2175.  
  2176. 8.  Acknowledgements
  2177.  
  2178.    The authors would like to thank the members of the SNMP Security
  2179.    Working Group of the IETF for their patience and comments. Special
  2180.    thanks go to Jeff Case who provided the first implementation of the
  2181.    protocols. Dave Balenson, John Linn, Dan Nessett, and all the members
  2182.    of the Privacy and Security Research Group provided many valuable and
  2183.  
  2184.  
  2185.  
  2186. Galvin, McCloghrie, & Davin                                    [Page 39]
  2187.  
  2188. RFC 1352                SNMP Security Protocols                July 1992
  2189.  
  2190.  
  2191.    detailed comments.
  2192.  
  2193. 9.  References
  2194.  
  2195.    [1] Case, J., M. Fedor, M. Schoffstall, and J. Davin, The Simple
  2196.        Network Management Protocol", RFC 1157, University of Tennessee
  2197.        at Knoxville, Performance Systems International, Performance
  2198.        Systems International, and the MIT Laboratory for Computer
  2199.        Science, May 1990.  (Obsoletes RFC 1098.)
  2200.  
  2201.    [2] Davin, J., Galvin, J., and K. McCloghrie, "SNMP Administrative
  2202.        Model", RFC 1351, MIT Laboratory for Computer Science, Trusted
  2203.        Information Systems, Inc., Hughes LAN Systems, Inc., July 1992.
  2204.  
  2205.    [3] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, MIT
  2206.        Laboratory for Computer Science, April 1992.
  2207.  
  2208.    [4] McCloghrie, K., Davin, J., and J. Galvin, "Definitions of Managed
  2209.        Objects for Administration of SNMP Parties", RFC 1353, Hughes LAN
  2210.        Systems, Inc., MIT Laboratory for Computer Science, Trusted
  2211.        Information Systems, Inc., July 1992.
  2212.  
  2213.    [5] FIPS Publication 46-1, "Data Encryption Standard", National
  2214.        Institute of Standards and Technology, Federal Information
  2215.        Processing Standard (FIPS); Supersedes FIPS Publication 46,
  2216.        January 15, 1977; Reaffirmed January 22, 1988.
  2217.  
  2218.    [6] ANSI X3.92-1981, "Data Encryption Algorithm", American National
  2219.        Standards Institute, December 30, 1980.
  2220.  
  2221.    [7] FIPS Publication 81, "DES Modes of Operation", National Institute
  2222.        of Standards and Technology, December 2, 1980, Federal
  2223.        Information Processing Standard (FIPS).
  2224.  
  2225.    [8] ANSI X3.106-1983, "Data Encryption Algorithm - Modes of
  2226.        Operation", American National Standards Institute, May 16, 1983.
  2227.  
  2228.    [9] FIPS Publication 74, "Guidelines for Implementing and Using the
  2229.        NBS Data Encryption Standard", National Institute of Standards
  2230.        and Technology, April 1, 1981.  Federal Information Processing
  2231.        Standard (FIPS).
  2232.  
  2233.   [10] Special Publication 500-20, "Validating the Correctness of
  2234.        Hardware Implementations of the NBS Data Encryption Standard",
  2235.        National Institute of Standards and Technology.
  2236.  
  2237.   [11] Special Publication 500-61, "Maintenance Testing for the Data
  2238.        Encryption Standard", National Institute of Standards and
  2239.  
  2240.  
  2241.  
  2242. Galvin, McCloghrie, & Davin                                    [Page 40]
  2243.  
  2244. RFC 1352                SNMP Security Protocols                July 1992
  2245.  
  2246.  
  2247.        Technology, August 1980.
  2248.  
  2249.   [12] Information Processing -- Open Systems Interconnection --
  2250.        Specification of Basic Encoding Rules for Abstract Syntax
  2251.        Notation One (ASN.1), International Organization for
  2252.        Standardization/International Electrotechnical Institute, 1987,
  2253.        International Standard 8825.
  2254.  
  2255. 10.  Authors' Addresses
  2256.  
  2257.        James M. Galvin
  2258.        Trusted Information Systems, Inc.
  2259.        3060 Washington Road, Route 97
  2260.        Glenwood, MD 21738
  2261.  
  2262.        Phone:  (301) 854-6889
  2263.        EMail:  galvin@tis.com
  2264.  
  2265.  
  2266.        Keith McCloghrie
  2267.        Hughes LAN Systems, Inc.
  2268.        1225 Charleston Road
  2269.        Mountain View, CA 94043
  2270.  
  2271.        Phone:  (415) 966-7934
  2272.        EMail:  kzm@hls.com
  2273.  
  2274.  
  2275.        James R. Davin
  2276.        MIT Laboratory for Computer Science
  2277.        545 Technology Square
  2278.        Cambridge, MA 02139
  2279.  
  2280.        Phone:  (617) 253-6020
  2281.        EMail:  jrd@ptt.lcs.mit.edu
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Galvin, McCloghrie, & Davin                                    [Page 41]
  2299.  
  2300.